From 092b64b838ed9b5dc0f7daea671d500501a419ae Mon Sep 17 00:00:00 2001 From: "ack@localhost.localdomain" Date: Fri, 4 Aug 2006 16:07:58 +0100 Subject: [PATCH] [NET] front: Check for received packets in network_open0 Because the backend brings up the interface long before the frontend has booted up, it is possible that by the time we get here we already have packets queued up for processing. If we don't process them here, we may delay them more than what is necessary. Worse yet, it is possible to miss the notification interrupt from the backend in such a way that we never get another one until we bring the interface down and up. Signed-off-by: Herbert Xu --- linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c index 7644b09b86..6bad0c4909 100644 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c @@ -497,6 +497,9 @@ static int network_open(struct net_device *dev) network_alloc_rx_buffers(dev); np->rx.sring->rsp_event = np->rx.rsp_cons + 1; + if (RING_HAS_UNCONSUMED_RESPONSES(&np->rx)) + netif_rx_schedule(dev); + netif_start_queue(dev); return 0; -- 2.30.2